package net.atos.excercise1;

import java.util.Collection;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class Main {

    public static void main(String... args) {

	final ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:/META-INF/spring/app-context.xml");
	final Library library = ctx.getBean(Library.class);
	final Audit audit = ctx.getBean(Audit.class);

	final Collection<Book> book = library.findByName("Lord");
	audit.log("books found: " + book);
    }
}
